<template>
<!-- 我的任务 -->
  <div class="Task">
    <!-- 顶部标题栏组件 -->
    <top-header :leftArrow="leftArrow"></top-header>
    <div class="content">
      <van-cell is-link title="当前任务" @click="click1" />
      <van-cell is-link title="历史任务" @click="click2" />
    </div>
  </div>
</template>

<script>
import { TopHeader } from '@/components'
export default {
  name: 'Task',
  components: {
    TopHeader
  },
  data () {
    return {
      leftArrow: true // 顶部标题栏组件是否有返回按钮
    }
  },
  methods: {
    click1 () {
      this.$router.push({ path: '/myTask' })
    },
    click2 () {
      this.$router.push({ path: '/pastTask' })
    }
  }
}
</script>

<style lang="less" scoped>
.Task {
  .content {
    box-shadow: 0 3px 4px 2px rgb(240, 240, 240);
  }
}
</style>
